import request from "../utils/request";

export const goodsList = (data) => {
    return request.get('/goods/list',{params:data})
}
export const goodsDel = (data) => {
    return request.get('/goods/del',{params:data}) 
}

export const goodsAdd = (data,config) => {
    return request.post('/goods/add',data,config)
}

export const goodsImg = (data,config) => {
    return request.post('/goods/goods_img_upload',data,config) 
}

export const goodsEdit = (data,config) => {
    return request.post('/goods/edit',data,config) 
}

// 查询所有分类
export const getCate = (data) => {
    return request.get('/goods/categories',{params:data})  
}

// 获取分类
export const getCateList = (data) => {
    return request.get('/goods/catelist',{params:data}) 
}

// 编辑分类
export const cateEdit = (data,config) => {
    return request.post('/goods/editcate',data,config)
}
// 删除分类
export const cateDel = (data) => {
    return request.get('/goods/delcate',{params:data})
}